﻿using System.ComponentModel.DataAnnotations;

namespace Entity.ERP.DTO.SaleDeliveryOrder
{
    /// <summary>
    /// 销售发货单模型 - 新增
    /// </summary>
    public class SaleDeliveryAddDTO
    {
        /// <summary>
        /// 销售发货编码
        /// </summary>
        [Required(ErrorMessage = "销售发货单编码Code不能为空")]
        public string Code { get; set; }

        /// <summary>
        /// 流转卡号
        /// </summary>
        [Required(ErrorMessage = "流转卡号CardNo不能为空")]
        public string CardNo { get; set; }

        /// <summary>
        /// 物流公司 ID
        /// </summary>
        [Required(ErrorMessage = "物流公司LogisticsId不能为空")]
        public string LogisticsId { get; set; }

        /// <summary>
        /// 客户 ID
        /// </summary>
        [Required(ErrorMessage = "客户CustomerId不能为空")]
        public string CustomerId { get; set; }

        /// <summary>
        /// 收货人
        /// </summary>
        [Required(ErrorMessage = "联系人Contact不能为空")]
        public string Contact { get; set; }

        /// <summary>
        /// 联系方式
        /// </summary>
        [Required(ErrorMessage = "联系方式Phone不能为空")]
        public string Phone { get; set; }

        /// <summary>
        /// 收货地址
        /// </summary>
        [Required(ErrorMessage = "收货地址Address不能为空")]
        public string Address { get; set; }

        /// <summary>
        /// 计划发货时间
        /// </summary>
        [Required(ErrorMessage = "计划发货时间PlanDeliveryTime不能为空")]
        public DateTime PlanDeliveryTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 附件
        /// </summary>
        public string? File { get; set; }

        /// <summary>
        /// 销售发货子单
        /// </summary>
        [Required(ErrorMessage = "销售发货子单items不能为空")]
        public List<SaleDeliveryItemAddDTO> items { get; set; }
    }
}
